<<<<<<< HEAD
<?php

/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \common\models\LoginForm */

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;

$this->title = 'Login';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-login">
    <h1><?= Html::encode($this->title) ?></h1>

    <p>Please fill out the following fields to login:</p>

    <div class="row">
        <div class="col-lg-5">
            <?php $form = ActiveForm::begin(['id' => 'login-form']); ?>

                <?= $form->field($model, 'username')->textInput(['autofocus' => true]) ?>

                <?= $form->field($model, 'password')->passwordInput() ?>

                <?= $form->field($model, 'rememberMe')->checkbox() ?>

                <div class="form-group">
                    <?= Html::submitButton('Login', ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>
                </div>

            <?php ActiveForm::end(); ?>
        </div>
    </div>
</div>
=======
<?php
/**
 * Author: lf
 * Blog: https://blog.szdma.com
 * Email: job@szdma.com
 * Created at: 2017-03-15 21:16.
 */

/**
 * @var yii\web\View
 * @var $model       \common\models\LoginForm
 */

use backend\assets\AppAsset;
use yii\helpers\Html;
use backend\widgets\ActiveForm;
use yii\helpers\Url;
use yii\captcha\Captcha;

AppAsset::register($this);
$this->title                   = yii::t('app', 'Login');
$this->params['breadcrumbs'][] = $this->title;
?>
<?php $this->beginPage(); ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language; ?>">
<head>
    <meta charset="<?= Yii::$app->charset; ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <?= Html::csrfMetaTags(); ?>
    <title><?= Html::encode($this->title); ?></title>
    <?php $this->head(); ?>
    <?= $this->render('/widgets/_language-js'); ?>
    <style>
        div.form-group div.help-block {
            position: absolute;
            left: 305px;
            width: 170px;
            top: 4px;
            text-align: left;
        }

        .form-horizontal .form-group {
            width: 300px;
            margin-left: 0px;
        }

        img#loginform-captcha-image {
            position: absolute;
            top: 2px;
            right: 1px;
        }

        .pagination {
            float: left;
            width: 100%;
            /*overflow: hidden;*/
            position: relative;
        }

        .pagination ul {
            clear: left;
            float: left;
            position: relative;
            left: 50%; /*整个分页向右边移动宽度的50%*/
            text-align: center;
            padding: 0;
        }

        .pagination li {
            display: block;
            float: left;
            position: relative;
            right: 50%; /*将每个分页项向左边移动宽度的50%*/
        }
    </style>
</head>
<body class="gray-bg">
<?php $this->beginBody(); ?>
<div class="middle-box text-center loginscreen  animated fadeInDown">
    <?= $this->render('/widgets/_flash'); ?>
    <div>
        <div>
            <div class="pagination">
                <ul>
                    <li><h1 class="logo-name">SZDMA</h1></li>
                </ul>
            </div>
        </div>
        <h3><?= yii::t('app', 'Welcome to'); ?> SZDMA CMS</h3>
        <?php $form = ActiveForm::begin(['id' => 'login-form']); ?>
        <?= $form->field($model, 'username', ['template' => "<div style='position:relative'>{input}\n{error}\n{hint}</div>"])
            ->textInput(['autofocus' => true, 'placeholder' => yii::t('app', 'Username')]); ?>

        <?= $form->field($model, 'password', ['template' => "<div style='position:relative'>{input}\n{error}\n{hint}</div>"])
            ->passwordInput(['placeholder' => yii::t('app', 'Password')]); ?>

        <?= $form->field($model, 'captcha', ['template' => '<div style="position:relative">{input}{error}{hint}</div>'])->widget(
            Captcha::classname(),
            [
                'template'     => '{input}{image}',
                'options'      => [
                    'class'       => 'form-control',
                    'style'       => 'width:300px;height:34px;position:relative;top:2px',
                    'placeholder' => yii::t('app', 'Verification Code'),
                ],
                'imageOptions' => [
                    'style' => 'cursor:pointer;right:0px',
                ],
            ]
        ); ?>
        <?= Html::submitButton(
            yii::t('app', 'Login'),
            [
                'class' => 'btn btn-primary block full-width m-b',
                'name'  => 'login-button',
            ]
        ); ?>

        <p class="text-muted text-center"><a href="<?= Url::to(['admin-user/request-password-reset']); ?>">
                <small><?= yii::t('app', 'Forgot password'); ?></small>
            </a> |
            <?php
            if ('en-US' == yii::$app->language) {
                echo '<a href = '.Url::to(['site/language', 'lang' => 'zh-CN']).' > 简体中文</a >';
            } else {
                echo '<a href='.Url::to(['site/language', 'lang' => 'en-US']).'>English</a>';
            }
            ?>
        </p>

        <?php ActiveForm::end(); ?>
    </div>
</div>
<?php $this->endBody(); ?>
</body>
</html>
<?php $this->endPage(); ?>
>>>>>>> sssyy/master
